from ._base import BaseModel
from ..extends.flask_sqlalchemy import db


class Link(BaseModel):
    site_name = db.Column(db.String(64), comment='网站名称')
    site_url = db.Column(db.String(64), comment='网站链接')
    site_logo = db.Column(db.String(128), comment='网站logo')
    site_person = db.Column(db.String(16), comment='网站负责人')
    site_contact = db.Column(db.String(32), comment='网站联系方式')

    @property
    def status_text(self):
        return 'Enable' if self.status else 'Stop'
